'use strict';

/**
 * Created by twer on 15/3/24.
 */
angular.module('space')
    .factory('SpaceVisitorService', [
        '$resource',
        'RootPathConstant',
        'PathSuffixConstant',
        function ($resource, RootPathConstant, PathSuffixConstant) {
            return $resource(RootPathConstant + '/space/:ownerId/visitors' + PathSuffixConstant, {},
                {query: {method: 'GET', isArray: true}}
            );
        }])

    .factory('SpaceFriendMessageService', [
        '$resource',
        'RootPathConstant',
        function ($resource, RootPathConstant) {
            return $resource(RootPathConstant + '/space/:ownerId/friend_messages', {},
                {query: {method: 'GET', isArray: false}}
            );
        }])

    .factory('SpacePasswordService', [
        '$resource',
        'RootPathConstant', function ($resource, RootPathConstant) {
            return $resource(RootPathConstant + '/space/:ownerId/password', {},
                {change: {method: 'PUT', isArray: false}}
            );
        }]);
